package com.maoyan.quickdevelop.admin.controller.system.dqroom;

import com.maoyan.quickdevelop.common.core.AjaxResult;
import com.maoyan.quickdevelop.system.service.IDqRoomService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author 猫颜
 * @date 2021年08月19日 下午2:37
 */
@RestController
@RequestMapping("/dqroom")
public class DqRoomController {
  @Autowired
  private IDqRoomService iDqRoomService;

  @GetMapping(value = "/list")
  public AjaxResult selectDqRooms() {
    return AjaxResult.success("查询成功", iDqRoomService.selectDqRooms());
  }

  @GetMapping("/roomnumber")
  public AjaxResult selectAllDqRoomNumberByRoomId(Long roomId){
    List<String> strings = iDqRoomService.selectAllDqRoomNumberByRoomId(roomId);
    return AjaxResult.success("查询成功",strings);
  }
}